<!--
描述：库房
开发人：zangyanming
开发日期：2018年8月7日
-->

<template lang="pug">
    kalix-dialog.user-add(bizKey="buyer" ref="kalixBizDialog" v-bind:form-model.sync="formModel" v-bind:targetURL="targetURL")
        div.el-form(slot="dialogFormSlot")
            div.s-flex
                el-form-item.s-flex_item(label="单位代码" prop="code" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.code")
                el-form-item.s-flex_item(label="单位名称" prop="name" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.name")
            div.s-flex
                el-form-item.s-flex_item(label="联系人" prop="contact" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.contact")
                el-form-item.s-flex_item(label="电话" prop="tel" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.tel")
            div.s-flex
                el-form-item.s-flex_item(label="传真" prop="fax" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.fax")
                el-form-item.s-flex_item(label="邮编" prop="zipCode" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zipCode")
            div.s-flex
                el-form-item.s-flex_item(label="地址" prop="addr" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.addr")
                el-form-item.s-flex_item(label="是否限非班级" prop="flag" v-bind:label-width="labelWidth")
                    <!--el-input(v-model="formModel.flag")-->
                    div(style="text-align:center")
                        el-switch.s-flex_item(v-model="formModel.flag" active-text="是" inactive-text="否" active-value="1" inactive-value="0")
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    import {BuyerURL} from '../../config.toml'

    export default {
        name: 'BuyerAdd',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                rules: {
                    //  userId: [{type: 'number', required: true, message: '请输入学生姓名', trigger: 'change'}]
                },
                targetURL: BuyerURL,
                labelWidth: '120px',
                params: {kclb: 0}
            }
        },
        components: {},
        created() {
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
    .el-form
        padding 30px 70px 30px 20px
</style>
